<extend name="Public/base" />
<block name="style">
    <style type="text/css">
    .bgmain {
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    }
    </style>
</block>
<block name="body">
    <include file="Public:timepicker" />

    <include file="Public:artdialog" />
    <form action="{:U('index_list')}" method="post" id="searchForm">
        <input type="hidden" name="status" id="status" value="1" />
        <div class="bgmain">
            <div class="row">
                <div class="col-md-12">
                    <div class="block-web" style="margin: 0;">
                        <div class="header">
                            <div class="actions_diy">
                                <a href="javascript:;" onclick="_es_openDilogMiddle2('{:U('add',array('region_id'=>$g['region_id']))}','附加费添加')" class="btn btn-default btn-primary"><i class="fa fa-plus"></i>添加附加费</a>

                                <a href="javascript:;" title="刷新当前页面" onclick="loadaa()" class="btn btn-default btn-default reloadcpagebtn"><i class="fa fa-repeat"></i></a>
                            </div>
                            <h3 class="content-header">偏远地区附加费列表</h3>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="block-web" style="padding-top:0px;">
                        <div class="btn-group actions_diy">
                            <!--  <button class="btn btn-default" onclick="_set_status_value('1')" type="button"> 所有商品 </button> -->
                        </div>
                        <div class="clearfix"></div>
                        <div class="porlets-content" style="margin-top:2px;">
                            <div class="table-responsive" id="load_tb_div">
                                <div style="height:100px;line-height:100px;text-align:center;">
                                    <img src="/Public/Admin/images/icon32_loading_light218877.gif" />
                                    加载中...
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </form>
</block>
<block name="script">
    <!-- select2 插件 -->
    <link href="/Public/static/select2/css/select2.min.css?v={:C('CURRENT_FILE_VERSION')}" rel="stylesheet" />
    <script type="text/javascript" src="/Public/static/select2/js/select2.full.min.js?v={:C('CURRENT_FILE_VERSION')}"></script>
    <!-- 加载 select2 语言包  -->
    <script type="text/javascript" src="/Public/static/select2/js/i18n/zh-CN.js?v={:C('CURRENT_FILE_VERSION')}"></script>

    <script type="text/javascript">
        var init_url = "{:U('index_list')}";
        $(function () {
            _load_html_byurl("{:U('index_list')}", "load_tb_div");
        });
        function del_one(obj) {
            art.dialog.confirm('您确认要删除此条数据吗？', function () {
                var url = $(obj).attr("data-url");
                $.post(url, function (data) {
                    if (data.status == 1) {
                        layermsg(data.info);
                        // _load_html_byurl("{:U('Goods/index_list')}", "load_tb_div");
                        _reload_currentpage_datalist("load_tb_div");
                    } else {
                        layermsg(data.info);
                    }
                });
            }, function () {

            });
        }

        function loadaa(){
            _load_html_byurl("{:U('index_list')}", "load_tb_div");
        }

        function one_sale(obj) {

            if(!confirm("您确定操作吗？")){
                return false;
            }

            var url = $(obj).attr("data-url");
            $.post(url, function (data) {
                if (data.status == 1) {
                    layermsg(data.info);
                    // _load_html_byurl("{:U('Goods/index_list')}", "load_tb_div");
                    _reload_currentpage_datalist("load_tb_div");
                } else {
                    layermsg(data.info);
                }
            });
        }

        function clear_from() {

            $("#searchForm").find("input[type='checkbox']").prop("checked", false);
            $("#searchForm").find("").prop("checked", false);
            $('form>select').val(null).trigger("change");
            $("#searchForm").find("input").val("");
        <if condition="$is_warn_number eq 1">
            $("#is_warn_number").val("{$is_warn_number}");
        </if>

            goSearch('#searchBtn','load_tb_div');
        }
    </script>
</block>